1. Field of the Invention
The present invention relates to a distance measurement technique, and in particular, to a technique for determining whether a distance image has been correctly calculated.
2. Description of the Related Art
Techniques are conventionally proposed which involve estimating a distance based on a plurality of captured images using a stereo method, a depth from defocus (DFD) method, a depth from focus (DFF) method, or the like, to generate a distance image. The stereo method is a technique for calculating a distance using parallaxes of corresponding places in a plurality of images captured at different viewpoints, based on the principle of triangulation. The DFD method and the DFF method are techniques for calculating distances based on variations in blur in a plurality of images captured with different image capturing parameters. The distance image generated by these techniques contains an error resulting from various factors, leading to degraded quality of an application that utilizes the distance image. In particular, if an object that is moving (hereinafter referred to as a moving object) is present or camera shake occurs when a plurality of images are consecutively captured at different points in time, the distance is calculated with no corresponding images among the captured images or calculated based on misaligned images. This prevents the correct value from being obtained.
To deal with such a problem with the distance calculation, Japanese Patent Application Laid-open No. H08-005370 has been proposed as a technique for detecting an area for which the distance has not been successfully correctly calculated. According to Japanese Patent Application Laid-open No. H08-005370, a contrast in an area in an image for which distances are to be calculated is detected, and when the contrast is low, an output indicating that the distance for the area is indefinite is provided.
Furthermore, Japanese Patent Application Laid-open No. 2008-293185 discloses a technique for detecting an error in alignment when a plurality of images is synthesized. Japanese Patent Application Laid-open No. 2008-293185 proposes a method of performing measurement of a frequency characteristic afterimage synthesis to detect an error in an alignment process based on the measured frequency characteristic.    Patent Literature 1: Japanese Patent Application Laid-open No. H08-005370    Patent Literature 2: Japanese Patent Application Laid-open No. 2008-293185